<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/8/8
 * Time: 16:30
 */

namespace App\Services\Biz;


use App\Services\Dao\SessionDao;
use App\Services\Dao\UserDao;

class LoginBiz
{
    public static function LoginCheck($account,$pwd) {
        $user = UserDao::getUserWithAccountAndPwd($account,$pwd);

        return $user;
    }

    public static function saveDeviceInfoToSessionTable($device_id,$user_uuid,$access_token,$refresh_token) {
        return SessionDao::saveDeviceInfoToSessionTable($device_id,$user_uuid,$access_token,$refresh_token);
    }

    public static function getSessionByDeviceIdAndUserUUID($device_id,$user_uuid) {
        return SessionDao::getSessionByDeviceIdAndUserUUID($device_id,$user_uuid);
    }
}